package com.kungfu.common;

/**
 * 返回码枚举类
 */
public enum ResultCodeEnum
{
    /** 成功 */
    SUCCESS("0", "Success"),
    
    /***参数请求错误**/
    REQUEST_PARAM_INVALID("400001", "请求参数错误"), 
    ACCESS_TOKEN_INVALID("400002", "token非法"),
    ACCESS_TOKEN_BLANK("400003", "token为空"),
    ACCESS_TOKEN_EXPIRED("400004", "token过期"),
    
   
    
    SERVER_INTERNAL_ERROR("500", "server internal error"),
    OTHER_ERROR("-1", "other error");

    private String code;
    private String desc;

    ResultCodeEnum(String code, String desc)
    {
        this.code = code;
        this.desc = desc;
    }

    public String getCode()
    {
        return code;
    }

    public String getDesc()
    {
        return desc;
    }

    public static void main(String[] args)
    {
        System.out.println(ResultCodeEnum.SUCCESS.getCode() + " - "
                + ResultCodeEnum.SUCCESS.getDesc());
        System.out.println(ResultCodeEnum.SUCCESS.getCode());
    }

}
